add_subdirectory(jsonPro)
# 递归导入库
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jsonPro/include)
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../inc)

# 可以通过如下两种方式将源文件列表存储到变量中
# aux_source_directory(. SOURCES)
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

# 生成可执行文件
add_executable(main ${SOURCES})
# 依赖的库文件
target_link_directories(main PUBLIC ${PROJECT_SOURCE_DIR}/build/lib/)
# 依赖的动态库
target_link_libraries(main jsonDll)

# 设置可执行文件输出位置，两种都可以
# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)
set_target_properties(main PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build)